﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Wheeler.Common.Extensions;

namespace Wheeler.Web.ViewModels
{
    public class TestResultSearchModel
    {
        public TestResultSearchModel() { }

        public TestResultSearchModel(String registrationNo, String fromDate, String toDate, String viewType)
        {
            this.RegistrationNo = registrationNo.IsEmpty() ? String.Empty : registrationNo.Trim();
            this.FromDate = fromDate.IsEmpty() ? String.Empty : fromDate.Trim() ;
            this.ToDate = toDate.IsEmpty() ? String.Empty : toDate.Trim() ;
            this.ViewType = viewType;
        }
        public String RegistrationNo { get; set; }
        public String FromDate { get; set; }
        public String ToDate { get; set; }
        public String ViewType { get; set; }

        public bool HasKeys
        {
            get
            {
                if (!this.ToDate.IsEmpty() || !this.FromDate.IsEmpty() || !this.RegistrationNo.IsEmpty())
                    return true;

                return false;
            }
        }
    }
}